package com.mc.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.mc.model.newsandbulletin;

public interface newsandbulletinMapper {
	int deleteByPrimaryKey(Integer id);

	int insert(newsandbulletin record);

	int insertSelective(newsandbulletin record);

	newsandbulletin selectByPrimaryKey(Integer id);

	int updateByPrimaryKeySelective(newsandbulletin record);

	int updateByPrimaryKeyWithBLOBs(newsandbulletin record);

	int updateByPrimaryKey(newsandbulletin record);

	void insertNorB(newsandbulletin record);

	List<newsandbulletin> selectAllNews();

	List<newsandbulletin> selectAllBulletin();

	int selectAllNewsCount();

	int selectAllBulletinCount();

	/**
	 * 获取首页新闻
	 * 
	 * @return
	 */
	public List<newsandbulletin> getIndexNews();

	
	public List<newsandbulletin> GetNewsByType(@Param("type") String type);

	public List<newsandbulletin> getBulletinByType(@Param("type") String type);
	public int CountNewsByType(String type);

	public int CountBulletinByType(String type);
	
	public List<newsandbulletin> getCommonNews(@Param("start") int start,@Param("pageSize") int pageSize);
	
	public List<newsandbulletin> getCommonBulletin(@Param("start") int start,@Param("pageSize") int pageSize);
    
    void updateNorB(newsandbulletin nb);
}